import {getSecklist} from "../../../util/axios"
const state={
     seckList:[],
}
const getters={
   gettersSecklist(state){
       return state.seckList
   }
}
const mutations={
    REQ_SECKLIST(state,payload){
        state.seckList = payload
    }
}
const actions={
    //获取秒杀列表
    getSecklistAction({commit}){
        getSecklist().then(res=>{
            if(res.code == 200){
                let list = res.list?res.list:[];
                commit("REQ_SECKLIST",list)
            }
        })
    }
  
}


export default{
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}